//
//  AEProductConfirmOrderRequest.m
//  AESOLAR_IOS
//
//  Created by Bin Tang on 2024/10/31.
//  Copyright © 2024 Mr.Wang. All rights reserved.
//

#import "AEProductConfirmOrderRequest.h"
#import "AE_Solar-Swift.h"

@interface AEProductConfirmOrderRequest ()
@property (nonatomic, assign) NSInteger productId;
@end

@implementation AEProductConfirmOrderRequest

/// 初始化
/// - Parameter productId: 商品id
- (instancetype)initWithProductId:(NSInteger)productId {
    if (self = [super init]) {
        self.productId = productId;
    }
    return self;
}

- (NSString *)requestUrl {
    return kAPP_ORDER_INFO_CONFIRM_ORDER;
}

- (TYZRequestMethod)requestMethod {
    return TYZRequestMethodPOST;
}

- (id)requestArgument {
    NSDictionary *params = @{@"productId":@(self.productId)};
    NSString *json = [params yy_modelToJSONString];
    NSString *aesStr = [AESCrypt AES128Encrypt:json key:[AEUserCommonInfo getAesKey]];
    return @{@"requestData": aesStr};
}

@end
